package com.example.demo.bean.conts;

public enum Oauth {
    OAUTH_URL_DEV("https://sit.account.lenovo.com"),
    OAUTH_URL_UAT("https://accountuat.lenovo.com"),
    OAUTH_URL_PRE("https://preaccount.lenovo.com"),
    OAUTH_URL_PRO("https://account.lenovo.com");


    private String url;

    Oauth(String url) {
        this.url = url;
    }

    public static String getURLByEnv(String env){
        String url = "";
        switch (env){
            case "sit": url = OAUTH_URL_DEV.url; break;
            case "uat":url = OAUTH_URL_UAT.url ;break;
            case "pre":url = OAUTH_URL_PRE.url;break;
            case "pro":url = OAUTH_URL_PRO.url;break;
        }
        return url;
    }
}
